﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.SqlClient;
using System.Data;

using Hanhud.Data;



namespace Hanhud.Win.Pages
{
    public class Page
    {
        string module;
        string name;
        string title;
        string description;
        string keywords;
        int pvalue;

        public Page()
        {
            module = "";
            name = "";
            title = "";
            description = "";
            keywords = "";
            pvalue = 1;
        }

        public Page(string module, string name, string title, string description, string keywords, int pvalue)
        {
            Module = module;
            Name = name;
            Title = title;
            Description = description;
            Keywords = keywords;
            PValue = pvalue;
        }

        public string Module
        {
            get { return module; }
            set
            {
                if (value.Trim() == "")
                    throw new Exception("Chưa nhập module.");
                else
                    module = value.Trim();
            }
        
        }

        public string Name
        {
            get { return name; }
            set
            {
                if (value.Trim() == "")
                    throw new Exception("Chưa nhập name.");
                else
                    name = value.Trim();
            }
        
        }

        public string Title
        {
            get { return title; }
            set
            {
                title = value.Trim();
            }

        }

        public string Description
        {
            get { return description; }
            set { description = value.Trim(); }
        }

        public string Keywords
        {
            get { return keywords; }
            set { keywords = value.Trim(); }
        }

        public int PValue
        {
            get { return pvalue; }
            set { pvalue = value; }
        }

    }

    public class PageBAL
    {       

         
    }


}
